GXNewPoint
You can use theGXNewPoint
function to create a new point shape and initialize its geometry.
gxShape GXNewPoint(const gxPoint *data);
data
- A pointer to the initial point geometry.
- function result
- A reference to the new point shape.
DESCRIPTION
TheGXNewPoint
function creates a copy of the default point shape, sets the owner count of the copy to 1, initializes its geometry with the values in thedata
parameter, and returns a reference to it as the function result.Although this function creates a copy of the default point shape, it does not create a copy of the default point's style, ink, or transform objects. The new point shape returned by this function contains references to the same style, ink, and transform as the default point shape.
SPECIAL CONSIDERATIONS
If no error occurs, theGXNewPoint
function creates a shape; you are responsible for disposing of this shape when you no longer need it. See Inside Macintosh: QuickDraw GX Objects for information about creating and disposing of shapes.If an error occurs, this function returns
nil
as the function result.ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory parameter_is_nil (debugging version) SEE ALSO
For an example that uses this function, see "Creating and Drawing Points" beginning on page 2-29.For a discussion of points and the default point shape, see "Point Shapes" on page 2-16.
For a description of the
gxPoint
structure, see page 2-104.To create a new point shape without specifying an initial geometry, see the description of the
GXNewShape
function in the chapter "Shape Objects" in Inside Macintosh: QuickDraw GX Objects.To set the geometry of an existing point shape, see the description of the
GXSetPoint
function on page 2-122.To draw a point geometry, see the description of
GXDrawPoint
on page 2-158. To draw a point shape, see the description ofGXDrawShape
in the chapter "Shape Objects" in Inside Macintosh: QuickDraw GX Objects.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help